package A9_19calculator;

public class Calculator {
    String color,brand;
    int price;

    public void show(){
        System.out.println(brand+"的计算器，外表"+color+"要"+price+"元");
    }
    public double Int(double a,double b,String c){
        if (c.equals("加")||c.equals("+")){
            return a+b;
        }else  if (c.equals("减")||c.equals("-")){
            return a-b;
        }else if (c.equals("乘")||c.equals("*")){
            return a*b;
        }else if (c.equals("除")||c.equals("/")){
            return a/b;
        }
        return 0;
    }

    public double Int(double a){
        return a*a*a;
    }

}
